import request, {ApiResponse} from "@/plugins/axios";


export const getListProjectByPage = (params) => {
    return request.get<any, ApiResponse<any>>(`/project/list/page`, params);
};

export const getByProjectId = (id) => {
    return request.get<any, ApiResponse<any>>(`/project/get/${id}`);
};

export const getListProject = (params) => {
    return request.get<any, ApiResponse<any>>(`/project/list`,params);
};

export const addProject = (data) => {
    return request.post<any, ApiResponse<any>>(`/project/add`, data);
};

export const updateProject = (data) => {
    return request.post<any, ApiResponse<any>>(`/project/update`, data);
};

export const deleteProject = (data) => {
    return request.post<any, ApiResponse<any>>(`/project/delete`, data);
};

export const getProjectTemplate = (id) => {
    return request.get<any, ApiResponse<any>>(`/project/template/${id}`);
};

export const addProjectTemplateRef = (data) => {
    return request.post<any, ApiResponse<any>>(`/projectTemplateRef/add`, data);
};
